package com.glodon.zhuanli.config;

import com.alibaba.fastjson.serializer.SerializerFeature;
import com.glodon.framework.common.Constants;
import com.glodon.framework.common.util.DTOUtil;
import com.glodon.framework.common.util.JsonMapper;
import com.glodon.framework.common.util.support.DTOHandlerForDate;
import com.glodon.framework.mybatis.config.MybatisConfig;
import com.glodon.infrastructure.config.BaseLocalConfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import(value={MybatisConfig.class})
public class ZhuanliConfig extends BaseLocalConfig {

    static{
        //系统统一常量配置
        JsonMapper.DEFAULT_GENERATE_FEATURE |= SerializerFeature.WriteMapNullValue.getMask() ;
        //只有日期的转换
		DTOUtil.addDTOHandler(new DTOHandlerForDate("_datestr" , Constants.DEFAULT_DATEONLY_PATTERN));

    }


}
